/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.product.entity.dict;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 商品属性字典Entity
 * @author 宋子军
 * @version 2016-11-21
 */
public class TbProductAttributeDict extends DataEntity<TbProductAttributeDict> {
	
	private static final long serialVersionUID = 1L;
	private String code;		// 编码
	private String value;		// 值
	private String option;		// 显示选项
	private Integer parentId;		// 父类ID
	private List<TbProductAttributeDict> parentDict;
	public TbProductAttributeDict() {
		super();
	}

	public TbProductAttributeDict(String id){
		super(id);
	}

	@Length(min=1, max=64, message="编码长度必须介于 1 和 64 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Length(min=1, max=64, message="值长度必须介于 1 和 64 之间")
	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	@Length(min=1, max=64, message="显示选项长度必须介于 1 和 64 之间")
	public String getOption() {
		return option;
	}

	public void setOption(String option) {
		this.option = option;
	}
	
	@NotNull(message="父类ID不能为空")
	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public List<TbProductAttributeDict> getParentDict() {
		return parentDict;
	}

	public void setParentDict(List<TbProductAttributeDict> parentDict) {
		this.parentDict = parentDict;
	}
}